@use "../fuzzer/HTTPFuzzerPageShare.module.scss" as HTTPFuzzerPageShare;
.project-manage-wrapper {
    width: 100%;
    height: 100%;
    padding: 16px 16px 0 12px;
    overflow: hidden;
    .project-manage-container {
        width: 100%;
        height: calc(100% - 16px);
        display: flex;
        flex-direction: column;
        gap: 16px;

        .project-header {
            width: 100%;
            height: 28px;
            display: flex;
            justify-content: space-between;

            .header-title {
                height: 100%;
                line-height: 28px;
                display: flex;
                gap: 8px;
                .title-style {
                    font-weight: 600;
                    font-size: 16px;
                    color: var(--Colors-Use-Neutral-Text-1-Title);
                }
                .total-style {
                    font-size: 12px;
                    color: var(--Colors-Use-Neutral-Disable);
                    .total-number {
                        color: var(--Colors-Use-Main-Primary);
                    }
                }
            }
        }

        .project-operate {
            width: 100%;
            height: 72px;
            display: flex;
            gap: 16px;

            .open-recent-wrapper {
                width: 326px;
                height: 72px;
                padding: 15px 12px;
                border: 1px solid var(--Colors-Use-Neutral-Border);
                border-radius: 4px;
                cursor: pointer;
                .open-recent-body {
                    width: 100%;
                    height: 100%;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;

                    .body-title {
                        height: 100%;
                        display: flex;
                        align-items: center;
                        gap: 8px;
                        .title-style {
                            font-size: 14px;
                            line-height: 20px;
                            color: var(--Colors-Use-Neutral-Text-1-Title);
                        }
                        .subtitle-style {
                            margin-top: 4px;
                            font-size: 12px;
                            line-height: 16px;
                            color: var(--Colors-Use-Neutral-Text-3-Secondary);
                        }
                    }
                    .icon-wrapper {
                        width: 28px;
                        height: 100%;
                        display: flex;
                        justify-content: right;
                        align-items: center;
                        color: var(--Colors-Use-Neutral-Text-1-Title);
                        .icon-body {
                            width: 28px;
                            height: 28px;
                            border-radius: 4px;
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            color: var(--Colors-Use-Neutral-Text-3-Secondary);
                        }
                        .icon-focus-body {
                            background: var(--Colors-Use-Neutral-Bg) !important;
                            color: var(--Colors-Use-Main-Primary);
                        }
                    }
                    .icon-wrapper:hover {
                        .icon-body {
                            background: var(--Colors-Use-Neutral-Bg);
                        }
                    }
                }
            }
            .open-recent-wrapper:hover {
                border: 1px solid var(--Colors-Use-Main-Border);
            }
            .open-recent-focus-wrapper {
                border-color: var(--Colors-Use-Neutral-Border) !important;
            }

            .btn-wrapper {
                width: 182px;
                height: 72px;
                padding: 16px 16px 16px 12px;
                border-radius: 4px;
                cursor: pointer;
                .btn-body {
                    width: 100%;
                    height: 100%;
                    display: flex;
                    justify-content: space-between;

                    .body-title {
                        height: 100%;
                        display: flex;
                        align-items: center;
                        gap: 8px;

                        font-size: 14px;
                        color: var(--Colors-Use-Neutral-Text-1-Title);
                    }
                    .icon-style {
                        height: 100%;
                        display: flex;
                        justify-content: right;
                        align-items: center;
                        color: var(--Colors-Use-Neutral-Text-3-Secondary);
                    }
                }
            }

            .new-temporary-project-wrapper {
                background: rgba(53, 216, 238, 0.1);
                .temporary-project-icon {
                    svg {
                        width: 32px;
                        height: 32px;
                    }
                }
            }
            .new-temporary-project-wrapper:hover {
                background: rgba(53, 216, 238, 0.2);
            }

            .new-project-wrapper {
                background: rgba(86, 201, 145, 0.1);
            }
            .new-project-wrapper:hover {
                background: rgba(86, 201, 145, 0.2);
            }

            .new-folder-wrapper {
                background: rgba(255, 182, 96, 0.1);
            }
            .new-folder-wrapper:hover {
                background: rgba(255, 182, 96, 0.2);
            }

            .import-wrapper {
                background: rgba(136, 99, 247, 0.1);
            }
            .import-wrapper:hover {
                background: rgba(136, 99, 247, 0.2);
            }
        }

        .project-search {
            height: 16px;
            font-size: 12px;
            line-height: 16px;
            color: var(--Colors-Use-Neutral-Text-1-Title);
            .total-style {
                color: var(--Colors-Use-Main-Primary);
            }
        }

        .project-path-wrapper {
            height: 16px;
            display: flex;
            flex-direction: row;
            align-items: flex-start;
            gap: 8px;

            font-size: 12px;
            line-height: 16px;
            color: var(--Colors-Use-Neutral-Text-1-Title);

            .path-style {
                cursor: pointer;
            }
            .path-style:hover {
                color: var(--Colors-Use-Main-Primary);
            }

            .icon-style {
                color: var(--Colors-Use-Neutral-Text-1-Title);
                :global {
                    svg {
                        width: 16px;
                        height: 16px;
                    }
                }
            }
        }

        .project-table-wrapper {
            width: 100%;
            flex: 1;
            overflow: hidden;
            .project-table-body {
                width: 100%;
                height: 100%;
                display: flex;
                flex-direction: column;

                .table-header-wrapper {
                    width: 100%;
                    height: 33px;
                    padding: 4px 0px 4px 4px;
                    display: flex;
                    gap: 4px;

                    font-weight: 600;
                    font-size: 12px;
                    line-height: 16px;
                    color: var(--Colors-Use-Neutral-Text-1-Title);

                    border-bottom: 1px solid var(--Colors-Use-Neutral-Border);

                    .header-titles {
                        height: 24px;
                        flex: 1;
                        .titls-body {
                            width: 100%;
                            height: 100%;
                            display: flex;
                            align-items: center;
                            .title-opt {
                                height: 100%;
                                overflow: hidden;
                                padding: 0 10px;
                                display: flex;
                                align-items: center;
                            }
                            .title-opt:first-child {
                                padding: 0 10px 0 4px;
                            }
                            .title-opt:last-child {
                                padding: 0 4px 0 10px;
                            }
                        }
                    }
                }

                .table-content-wrapper {
                    width: 100%;
                    flex: 1;
                    overflow: hidden;
                    .table-opt {
                        width: 100%;
                        padding: 10px 0px 10px 4px;
                        display: flex;
                        align-items: center;
                        gap: 4px;
                        cursor: pointer;
                        .opt-content {
                            flex: 1;
                            height: 100%;
                            overflow: hidden;
                            .content-body {
                                width: 100%;
                                height: 100%;
                                display: flex;
                                align-items: center;
                                .content-opt {
                                    height: 100%;
                                    padding: 0 10px;
                                    overflow: hidden;

                                    display: flex;
                                    align-items: center;

                                    font-size: 12px;
                                    color: var(--Colors-Use-Neutral-Text-3-Secondary);
                                    .content-style {
                                        width: 100%;
                                        height: 16px;
                                        line-height: 16px;
                                        overflow: hidden;
                                        white-space: nowrap;
                                        text-overflow: ellipsis;
                                    }
                                }
                                .content-opt:first-child {
                                    padding: 0 10px 0 4px;
                                }
                                .content-opt:last-child {
                                    padding: 0 4px 0 10px;
                                }
                            }
                        }

                        .opt-operate {
                            height: 100%;
                            padding: 2px 0;
                        }
                    }
                    .table-opt:hover {
                        background: var(--Colors-Use-Neutral-Bg-Hover);
                        border-radius: 4px;
                    }
                    .table-opt + .table-opt {
                        border-top: 1px solid var(--Colors-Use-Neutral-Border);
                    }
                    .table-opt-selected {
                        background: var(--Colors-Use-Main-Bg) !important;
                        border-radius: 4px;
                    }

                    .table-loading-more {
                        width: 100%;
                        height: 20px;
                        line-height: 20px;
                        text-align: center;
                        color: var(--Colors-Use-Neutral-Text-1-Title);
                    }

                    .table-empty-wrapper {
                        padding: 100px;
                        .title-style {
                            margin-top: 24px;
                            height: 16px;
                            font-size: 12px;
                            line-height: 16px;
                            color: var(--Colors-Use-Neutral-Disable);
                            .file-style {
                                color: var(--Colors-Use-Neutral-Text-1-Title);
                            }
                        }

                        .operate-btn {
                            margin-top: 24px;
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            gap: 16px;
                        }
                    }
                }
            }

            :global {
                .ant-spin-nested-loading > div > .ant-spin {
                    top: 20%;
                }
            }
        }
    }
}

.project-table-filter {
    height: 100%;
    padding: 4px 8px 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    .icon-style {
        color: var(--Colors-Use-Neutral-Text-1-Title);
        :global {
            svg {
                width: 16px;
                height: 16px;
            }
        }
    }
}
.project-table-filter-dropdown {
    padding: 4px 8px;
    background: var(--Colors-Use-Neutral-Bg);
    border-radius: 4px;
}

// 表格内容详细样式
.project-table-body-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    .project-style {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}
.project-name-wrapper {
    color: var(--Colors-Use-Neutral-Text-1-Title);
    .opt-project-icon {
        color: #56c991;
    }
    .opt-floder-icon {
        color: #ffb660;
    }
}
.database-path-wrapper {
    color: var(--Colors-Use-Main-Primary);
}
// 表格操作区样式
.project-operate-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    .btn-wrapper {
        width: 24px;
        height: 24px;
        border-radius: 4px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;

        :globa {
            svg {
                width: 16px;
                height: 16px;
            }
        }
    }
    .btn-wrapper:hover {
        background: var(--Colors-Use-Neutral-Bg);
    }
    .btn-focus-style {
        background: var(--Colors-Use-Main-Bg) !important;
    }

    .divider-style {
        width: 1px;
        height: 100%;
        padding: 6px 0;
        .boder-style {
            width: 1px;
            height: 100%;
            border-left: 1px solid var(--Colors-Use-Neutral-Border);
        }
    }
    .btn-style {
        color: var(--Colors-Use-Neutral-Text-3-Secondary);
        svg {
            stroke-width: 1.5;
            width: 16px;
            height: 16px;
        }
    }
    .del-style {
        color: var(--Colors-Use-Error-Primary);
        svg {
            stroke-width: 1.5;
            width: 16px;
            height: 16px;
        }
    }
}

// dropdownmenu 组件业务样式
.dropdown-menu-filter-wrapper {
    border-radius: 4px;
    border: 1px solid var(--Colors-Use-Neutral-Border);
    box-shadow: 0px 2px 4px var(--Colors-Use-Basic-Shadow);
}
.dropdown-menu-body {
    border-radius: 4px;
    padding: 8px 4px;

    :global(.ant-dropdown-menu-item.ant-dropdown-menu-item-only-child span) {
        &.all-icon {
            color: #4a94f8;
        }
        &.project-icon {
            color: #56c991;
        }
        &.floder-icon {
            color: #ffb660;
        }
    }
}

// 新建项目或文件夹
.new-project-and-folder-wrapper {
    padding: 24px;

    .remark-header{
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .required-style {
        font-family: SimSun, sans-serif;
        font-size: 14px;
        color: var(--Colors-Use-Error-Primary);
    }

    .required-form-item-wrapper {
        border: 1px solid var(--Colors-Use-Error-Border) !important;
    }

    .form-item-cascader {
        width: 399px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .hint-style {
            color: var(--Colors-Use-Neutral-Text-1-Title);
        }
    }
    :global {
        .ant-select:not(.ant-select-customize-input) .ant-select-selector {
            border: 1px solid var(--Colors-Use-Neutral-Border);
            border-radius: 4px;
        }
        .ant-select:not(.ant-select-disabled):hover .ant-select-selector {
            border-color: var(--Colors-Use-Main-Hover);
        }
        .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
            border-color: var(--Colors-Use-Main-Hover);
            box-shadow: 0 0 0 2px var(--Colors-Use-Main-Focus);
            border-right-width: 1px;
            outline: 0;
        }
    }

    .form-btn-wrapper {
        margin-top: 16px;
        display: flex;
        justify-content: right;
        gap: 8px;
    }

    .export-form-item-password-wrapper {
        :global {
            .ant-input-affix-wrapper {
                border: 1px solid var(--Colors-Use-Neutral-Border);
                border-radius: 4px;
            }
            .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover {
                border-color: var(--Colors-Use-Main-Hover);
            }
            .ant-input-affix-wrapper:focus {
                border-color: var(--Colors-Use-Main-Primary);
                box-shadow: 0 0 0 2px var(--Colors-Use-Main-Focus);
            }
            .ant-input-affix-wrapper-focused {
                border-color: var(--Colors-Use-Main-Primary);
                box-shadow: 0 0 0 2px var(--Colors-Use-Main-Focus);
            }
            .ant-input-password-icon.anticon {
                color: var(--Colors-Use-Neutral-Disable);
            }
        }
    }

    .import-form-item-help-wrapper {
        margin-top: 2px;
        height: 20px;
        font-size: 14px;
        line-height: 20px;
        color: var(--Colors-Use-Neutral-Text-1-Title);
        .upload-btn {
            color: var(--Colors-Use-Main-Primary);
        }
    }
}

// cascader组件下拉框
.cascader-dropdown-body {
    width: 400px;
    color: var(--Colors-Use-Neutral-Text-1-Title);
    :global {
        .ant-cascader-menu-item {
            &:hover {
                background-color: var(--Colors-Use-Neutral-Bg);
            }
            &-active {
                background-color: var(--Colors-Use-Neutral-Bg);
            }
        }
    }
}

// .cascader-dropdown-wrapper {
//     padding: 4px 12px 0;
//     width: 100%;
//     display: flex;
//     align-items: center;
//     gap: 4px;

//     .input-wrapper {
//         flex: 1;
//         overflow: hidden;
//     }
// }

// 传输项目文件弹窗
.transfer-project-mask {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    background: rgba(49, 52, 63, 0.3);
}
.transfer-project-hidden-mask {
    display: none;
}
.transfer-project-mask-body {
    width: 100%;
    height: 100%;
    position: relative;
}

.project-export-modal {
    width: 448px;
    position: absolute;
    top: 35%;
    left: calc(50% - 224px);
}
.project-import-modal {
    width: 640px;
    position: absolute;
    top: 35%;
    left: calc(50% - 320px);
}

.modal-transfer-project {
    box-sizing: border-box;
    background: var(--Colors-Use-Neutral-Bg-Hover);
    border: 1px solid var(--Colors-Use-Neutral-Border);
    box-shadow: 0px 6px 20px var(--Colors-Use-Basic-Shadow);
    border-radius: 4px;

    .transfer-project-wrapper {
        width: 100%;
        padding: 24px;
        display: flex;
        gap: 16px;
        position: relative;

        .modal-left-wrapper {
            display: flex;
            flex-direction: column;
            justify-content: space-between;

            .modal-icon {
                width: 32px;
                height: 32px;
            }
        }

        .modal-right-wrapper {
            flex: 1;
            overflow: hidden;

            .modal-right-title {
                height: 24px;
                font-weight: 600;
                font-size: 16px;
                line-height: 24px;
                color: var(--Colors-Use-Neutral-Text-1-Title);
            }

            .download-progress {
                .progress-content-style {
                    height: 16px;
                    font-weight: 600;
                    font-size: 12px;
                    line-height: 16px;
                    color: var(--Colors-Use-Neutral-Text-1-Title);
                }
            }

            .modal-right-content {
                max-height: 240px;
                margin-top: 8px;
                font-size: 14px;
                line-height: 24px;
                color: var(--Colors-Use-Neutral-Text-1-Title);
                overflow: hidden auto;
                .error-style {
                    color: var(--Colors-Use-Error-Primary);
                }
            }

            .modal-right-btn {
                margin-top: 24px;
                display: flex;
                justify-content: right;
                align-items: center;
            }
        }
    }
}

.variable-project-list{
    .variable-list {
        color: var(--Colors-Use-Neutral-Disable);
        .variable-list-panel {
            &:hover {
                .variable-list-remove {
                    display: flex;
                }
            }
    
            .extra-wrapper {
                display: flex;
                justify-content: flex-end;
                align-items: center;
            }
    
            .variable-list-remove {
                display: none;
                @include HTTPFuzzerPageShare.base-icon-card;
                color: var(--Colors-Use-Error-Primary);
            }
    
            .variable-fuzzer-tag {
                color: var(--Colors-Use-Neutral-Text-1-Title);
                font-size: 12px;
                font-weight: 400;
                line-height: 16px;
            }
            :global {
                .ant-collapse-header {
                    .ant-collapse-header-text {
                        overflow: hidden;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                    }
                }
                .ant-collapse-content > .ant-collapse-content-box {
                    padding-bottom: 0;
                }
            }
        }
        .variable-plus-button {
            width: 100%;
            padding-right: 6px;
        }
        :global {
            .ant-collapse-item.ant-collapse-item-active{
                background-color: transparent;
            }
        }
    }
}

.variable-project-item{
    border: 1px solid var(--Colors-Use-Neutral-Border);
    border-radius: 4px;
    padding: 8px;
    background-color: #fff;

    &:hover {
        border-color: var(--Colors-Use-Main-Hover);
    }

    &:focus-within {
        border-color: var(--Colors-Use-Main-Primary);
        box-shadow: 0 0 2px 2px var(--Colors-Use-Main-Focus);
    }

    input::placeholder,
    textarea::placeholder {
        color: var(--Colors-Use-Neutral-Disable);
        font-size: 12px;
    }

    textarea::-webkit-resizer {
        background-color: transparent;
    }

    .variable-item-input {
        border: 0;
        border-bottom: 1px solid var(--Colors-Use-Neutral-Border);
        width: 100%;
        outline: none;
        outline: 0;
    }

    .variable-item-textarea-body {
        position: relative;

        .variable-item-textarea {
            border: 0;
            width: 100%;
            outline: none;
            outline: 0;
        }

        .resizer-icon {
            position: absolute;
            bottom: 6px;
            right: 0;
            color: var(--Colors-Use-Neutral-Text-1-Title);
            z-index: 0;
            pointer-events: none;
        }
    }
}
.icon-question {
    color: var(--Colors-Use-Neutral-Text-1-Title);

    :hover {
        color: var(--Colors-Use-Blue-Hover);
    }
}